#ifndef _COLLISION_COMPONENT_H_
#define _COLLISION_COMPONENT_H_

#include "IComponent.h"
#include "..\Graphics\Camera.h"

#include <functional>

class VisualComponent;
class CollisionComponent : public IComponent
{
public:
	CollisionComponent(std::function<void()> p_func, vn::Camera* p_camera = nullptr);
	CollisionComponent(void);
	virtual ~CollisionComponent(void);

	virtual const std::string getType() { return "CollisionComponent"; }
	virtual const std::string getFamilyType() { return "CollisionComponent"; }

	virtual void init();
	virtual void update(const GameTime& p_gameTime);

	void setCollisionCallback(std::function<void()> p_func) { m_callback = p_func; }
	void setCamera(vn::Camera* p_camera) { m_camera = p_camera; }

protected:
	std::function<void()> m_callback;
	vn::Camera* m_camera;
	VisualComponent* m_visualComponent;
};

#endif // _COLLISION_COMPONENT_H_